import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
//导入
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//导入
import STable from '@surely-vue/table'

import ViewUIPlus from 'view-ui-plus'
import 'view-ui-plus/dist/styles/viewuiplus.css'

import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'

const webackCompont = require.context('./components', true, /\.vue$/)

import vant from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'

// 3. 注册你需要的组件

const app = createApp(App)
const webackCompontS = webackCompont.keys().forEach((item) => {
  const utrl = webackCompont(item).default
  app.component(utrl.name, utrl)
})

app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.use(Antd).use(store).use(ViewUIPlus).use(router).use(vant).mount('#app')
